﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ExtensionControls
{
    public class PersonViewModelCollection : BaseViewModelCollection<PersonViewModel, EPersonColumn>
    { 
        public override List<ExtensionGridColumnHeader> GetColumnsType()
        {
            List<ExtensionGridColumnHeader> returnTypes = new List<ExtensionGridColumnHeader>();

            returnTypes.Add(new ExtensionGridColumnHeader(EControl.OBJECT, "Obiekt"));


            foreach (EPersonColumn column in this._Columns)
            {
                switch (column)
                {
                    case EPersonColumn.NAME:
                        returnTypes.Add(new ExtensionGridColumnHeader(EControl.TEXT, "Imię"));
                        break;
                    case EPersonColumn.SURNAME:
                        returnTypes.Add(new ExtensionGridColumnHeader(EControl.TEXT, "Nazwisko"));
                        break;
                    case EPersonColumn.CITY:
                        returnTypes.Add(new ExtensionGridColumnHeader(EControl.DICTIONARY, "Miasto"));
                        break;
                    case EPersonColumn.MAN:
                        returnTypes.Add(new ExtensionGridColumnHeader(EControl.CHECKBOX, "Czy mężczyzna"));
                        break;
                    default:
                        returnTypes.Add(new ExtensionGridColumnHeader(EControl.TEXT, ""));
                        break;
                }
            }

            return returnTypes;
        }
    }
}
